/**
 * 
 */
package com.cougil.uoc.seghismed.model.ciphed.test;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * @author Ignacio Cougil Jares
 *
 */
public class UANoXML {

	private String name;
	private byte[] valor;

	/**
	 * @return Retorna el valor de la propietat name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param Estableix
	 *            name com a valor de la propietat name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return Retorna el valor de la propietat valor
	 */
	public byte[] getValor() {
		return valor;
	}

	/**
	 * @param Estableix
	 *            valor com a valor de la propietat valor
	 */
	public void setValor(byte[] valor) {
		this.valor = valor;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(final Object other) {
		if (!(other instanceof UANoXML))
			return false;
		UANoXML castOther = (UANoXML) other;
		return new EqualsBuilder().append(name, castOther.name).append(valor, castOther.valor)
				.isEquals();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		return new HashCodeBuilder().append(name).append(valor).toHashCode();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).appendSuper(
				super.toString()).append("name", name).append("valor", new String(valor))
				.toString();
	}
	
	
}
